@extends('home.layout.base')
<link rel="stylesheet" href="{{URL::asset('./css/hrmy/assets.css')}}">

@section('content')
<div class="mainHrContent" id="hrAssets">
    <div class="storelistTitle">
        <span class="storelistTitle_left">
            <span>
                <img src="{{URL::asset('./img/icon/home.png')}}">
            </span>
            <span><a href="{{route('home.index.index') }}">首页</a> >
                <a href="{{route('home.hrmy.hrIndex') }}">用户中心</a>
                > 资产管理中心
            </span>
        </span>
        <span class="storelistTitle_right">
            <span>找不到合适的供应商？发个需求试试？</span>
            <button @click=" window.location.href = '{{ route('home.demand.demandAdd') }}'">免费发布需求</button>
        </span>
    </div>
    <div class="hrContent">
        @include('home.hrmy.menu')
        <div class="basicInfo" id="hrAssetss">
            <div class="basicInfo_title">
                <span></span>
                资产管理中心
            </div>
            <div class="assetsMain">
                <div>
                    <span>
                        <span class="spanImg">
                            <img src="{{URL::asset('./img/icon/assets_1.png')}}">
                        </span>
                        <span class="spanMes">
                            <p>积分</p>
                            <p>@{{listData.integral}}分</p>
                        </span>
                    </span>
                    <span class="assetsMainButton">
                        <button><a>获取积分</a></button>
                        <button><a href="{{route('home.hrmy.hrAssetsConsume') }}">消费记录</a></button>
                    </span>
                </div>
                <div>
                    <span>
                        <img src="{{URL::asset('./img/icon/assets_2.png')}}">
                        <span class="spanMes">
                            <p>余额</p>
                            <p>@{{listData.balance}}元</p>
                        </span>
                    </span>
                    <span class="assetsMainButton">
                        <button><a href="{{route('home.hrmy.hrCashOut') }}">提现</a></button>
                    </span>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('compontentScipts')
<script>
    $(() => {
        let hrAssets = new Vue({
            el: '#hrAssetss',
            data: () => {
                return {
                    listData: {},
                }
            },
            created() {
                this.getData();
            },
            mounted() {},
            methods: {
                getData() {
                    let data = {}
                    apiAjax("{{ route('home.user.userAssetApi')}}", 'get', data, (res) => {
                        if (res.code == 0) {
                            this.listData = res.data;
                        } else {
                            this.$message({
                                message: res.msg,
                                type: 'warning'
                            });
                        }
                    }, (erro) => {

                    });
                },
            }
        })
    })
</script>
@endsection